﻿using STHPMS1.ICore.I_Entity.Info;
using STHPMS1.ICore.I_Entity.Stmpms1;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Data;

namespace STHPMS1.ICore.I_BLL.Bus
{
    public interface IS_InspeaccseBill : IBll
    {
        bool Exists(string unit, string inspecid, string tableName, string svydate);
       /// <summary>
        /// 返回当前线路单元的评定数据的最新导入时间，最小桩号和最大桩号
       /// </summary>
       /// <param name="rdid">路线编号</param>
       /// <param name="inspecid">评定名称</param>
       /// <param name="dir">方向</param>
       /// <param name="tableName">检测数据表</param>
       /// <returns></returns>
        DataTable GetInspeaccseData(string rdid, string inspecid, int dir, string tableName);
        /// <summary>
        /// 返回当前评定名称下今年的路线编号
        /// </summary>
        /// <param name="tableName"></param>
        /// <param name="inspecid"></param>
        /// <returns></returns>
        DataTable GetRdway(string tableName, string inspecid);
        /// <summary>
        /// 删除检查数据的重复单元
        /// </summary>
        /// <param name="tableName">表名</param>
        /// <param name="olds">重复的单元</param>
        /// <param name="inspecid">评定名称</param>
        /// <returns></returns>
        void UpdateUnit(string tableName, List<DataRow> olds, string inspecid);
        void Save<T>(T entity) 
            where T:class ,IS_Inspeaccse;

        void Remove(IS_Inspeaccse entity);

        IEnumerable<T> Get<T>(Expression<Func<T, bool>> predicate, IPagingInfo info)
            where T : class, IS_Inspeaccse;
        bool Exists(string inspecId);

        /// <summary>
        /// 修改评定表的列
        /// </summary>
        /// <param name="inspecId">评定ID</param>
        /// <param name="typeColumn">评定表列名</param>
        /// <returns></returns>
        bool UpdateStatus(string inspecId, string typeColumn);
        /// <summary>
        /// 获取一个路线下所有的检测Id
        /// </summary>
        /// <param name="rdwayid"></param>
        /// <returns></returns>
        List<string> List(string rdwayid);
    }
}
